home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / editor / xes.lha / XES / S / arexx-mode.xrc < prev    next >
Text File  |  1995-08-14  |  3KB  |  55 lines

  1. # $VER: arexx-mode.xrc 1.1 (14 Aug 1995)
  2. #ARexx Mode
  3. setmacro arexx-mode 0 (Mx-f settvar mode (ARexx) settvar ccq zARx settvar ftab rx-indent settvar btab prog-backtab)
  4. arexx-mode
  5.  
  6. setmacro rx-indent 0 (ifelse cb (goto start while cb (rx-indentline down) goto start) rx-indentline)
  7. setmacro rx-region 0 (region-top while y=<\$my (rx-indentline down))
  8. setmacro rx-when 0 (prevf SELECT if \$fail (rx-err (\\\$currentword without SELECT)) rx-setx)
  9. setmacro rx-else 0 (closer? END THEN prev2 ELSE \$closer if c="ELSE" (rx-err (Unbound ELSE)) if c="END" (rx-matchend last prev2 ELSE THEN if c<>"THEN" (rx-err (Unbound ELSE))) prev2 IF WHEN if c="WHEN" (rx-err (Unbound ELSE)) firstnb setx)
  10. setmacro rx-err? 1 (if \$fail (rx-err (\$arg1)))
  11. setmacro rx-err 1 (pop pos request (ARexx Code Error) (\$arg1) (Continue) abort)
  12. setmacro rx-matchend 0 (set yy \$lineno rx-prevds rx-countends while 1 (repeat \\\$cnt rx-prevds set old \\\$cnt rx-countends intcmp \\\$cnt \\\$old if 3 break) repeat \$cnt rx-prevds)
  13. setmacro rx-prevds 0 (prev2 DO SELECT rx-err? (Unbound END))
  14. setmacro rx-countends 0 (set cnt 0 while y<\$yy (wfind END inc cnt))
  15. setmacro rx-setx 0 (set x \$firstnb add x \$tabstop)
  16. setmacro rx-1 0 (set x 1)
  17. setmacro rx-do 0 (set cnt 0 while 1 (prev2 DO END if \\\$fail (rx-1 break) if c="END" (inc cnt prev2 DO SELECT rx-err? (Unbound END) if c="SELECT" (dec cnt)) if c="DO" (intcmp \\\$cnt 0 ifelse 3 rx-setx rx-1 break)))
  18. setmacro rx-end 0 (push pos prev2 DO SELECT pop pos rx-err? (Unbound END) rx-matchend firstnb setx)
  19. setmacro rx-getcol 0 (rx-goprevline last wleft do (when c="THEN" rx-setx when c="ELSE" rx-setx pick pos rx-do))
  20. setmacro rx-goprevline 0 (while 1 (findstr (\\\$prevnbline) fail? prev if \\\$fail break if c<>"/*" break))
  21. setmacro rx-indentline 0 (firstnb push pos do (when c="ELSE" rx-else when c="END" rx-end when c="WHEN" rx-when when c="OTHERWISE" rx-when rx-getcol) pop pos dec x pos-line \$x)
  22.  
  23. map zARx-] justify-comment
  24. map zARx-/ insert-border
  25. map zARx-a ((ARG ))
  26. map zcARx-a ((ADDRESS ))
  27. map zARx-b ((BREAK))
  28. map zARx-c ((CALL ))
  29. map zcARx-c ((COMMAND ))
  30. map zARx-d ((DO ))
  31. map zcARx-d ((DROP ))
  32. map zARx-e ((ELSE ) rx-indentline)
  33. map zcARx-e ((END ) rx-indentline)
  34. map zARx-i ((IF ))
  35. map zcARx-i ((ITERATE))
  36. map zARx-l ((LEAVE))
  37. map zARx-n ((NOP))
  38. map zcARx-n ((NUMERIC))
  39. map zARx-o ((OTHERWISE ))
  40. map zcARx-o ((OPTIONS ))
  41. map zARx-p ((PARSE ))
  42. map zcARx-p ((PROCEDURE))
  43. map zARx-q ((QUEUE ))
  44. map zARx-r ((RETURN ))
  45. map zcARx-r ((RESULTS ))
  46. map zARx-s ((SELECT ))
  47. map zcARx-s ((SAY ))
  48. map zARx-t ((THEN ))
  49. map zcARx-t ((TRACE ))
  50. map zARx-tab (rx-region)
  51. map zARx-u ((UPPER ))
  52. map zARx-w ((WHEN ))
  53. map zARx-v (rx2 XES:Rexx/VER RX R)
  54. map zcARx-v (rx2 XES:Rexx/VER RX V)
  55.